home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#18 (Mar 87)
/
Printer LSP sources
/
MyGlobalsStuff
< prev
next >
Wrap
Text File
|
1987-02-13
|
2KB
|
80 lines
UNIT MyGlobals;
INTERFACE
USES
MacPrint;
TYPE
WordPtr = ^INTEGER;
MyWindMode = (NullMode, OpenMode, DAMode);
WindowData = RECORD { Can only hold one 32-bit value in wRefCon }
theTE : TEHandle; { for TextEdit record }
theTHP : THPrint; { the TPrint we are analyzing }
END;
WindowDataPtr = ^WindowData;
WindowDataHandle = ^WindowDataPtr;
CONST
{ Change these to suit your taste }
myStdFont = monaco;
myStdSize = 9;
myHdgFont = systemFont; { aka Chicago }
myHdgSize = 12;
{ menus }
appleMenu = 1;
fileMenu = 2;
newItem = 1;
closeItem = 2;
stlItem = 4;
jobItem = 5;
setupItem = 7;
printItem = 8;
quitItem = 10;
lastFileItem = 10;
editMenu = 3;
lastMenu = 3; {Number of menus}
{ Resources }
ALRT_about = 256; { About… message }
ALRT_printerr = 257; { report printing error }
DLOG_printing = 258; { printing status dialog }
STR_id = 256; {about message}
STR_pagehead = 257; { page heading }
STR_prepare = 300; { messages for printing status }
STR_printing = 301;
STR_spooling = 302;
STR_of = 303;
STR_prspool = 304;
STRN_scan = 256; { enumeration literals }
STRN_feed = 257;
STRN_wdev = 258;
STRN_job = 259;
STRN_bool = 260;
WIND_main = 256;
{Constant declared for field windowKind}
myDocument = 8;
{ Character }
Return = $0D;
VAR
myWindow : WindowPtr;
myPeek : WindowPeek;
hTE : TEHandle; {The active text edit handle}
printHdl : THPrint; {for actual printing}
myMenus : ARRAY[1..lastMenu] OF MenuHandle;
dragRect : Rect;
theChar : CHAR; {Keyboard input goes here}
doneFlag : BOOLEAN;
printFlag : BOOLEAN; {The user selected 'Print…' from the File menu}
currWMode : MyWindMode; { sets menu options }
myEvent : EventRecord; {Shared by all routines}
watchHdl : CursHandle; {The wait cursor}
wdh : WindowDataHandle; { temporary }
ph : THPrint; { temporary for analyzed TPrint record }
spare : Ptr; {a preallocated area to be used by the next window}
linebuff : Str255;
IMPLEMENTATION
END.